package com.dongdongqiang.admin.controller;

import com.dongdongqiang.admin.form.DdqUserSearchForm;
import com.dongdongqiang.admin.service.DdqUserService;
import com.dongdongqiang.common.base.BasePage;
import com.dongdongqiang.domain.user.DdqUser;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by ZZB on 2017/11/4.
 */
@Controller
public class DdqUserController extends SysUserLoginController {
    @Autowired
    private DdqUserService ddqUserService;

    @RequestMapping("/ddq/user/list")
    public String list(DdqUserSearchForm searchForm, Model model){
        BasePage<DdqUser> ddqUserBasePage = ddqUserService.queryPage(searchForm);
        model.addAttribute("page",ddqUserBasePage);
        return "/user/list";
    }
}
